Grokking Algorithms An Illustrated Guide For Programmers and Other Curious People

Grokking Algorithms An Illustrated Guide For Programmers and Other Curious People

  • Downloads:4543
  • Type:Epub+TxT+PDF+Mobi
  • Create Date:2021-03-08 03:20:10
  • Update Date:2025-09-07
  • Status:finish
  • Author:Aditya Y. Bhargava
  • ISBN:1617292230
  • Environment:PC/Android/iPhone/iPad/Kindle

Summary

An algorithm is nothing more than a step-by-step procedure for solving a problem。 The algorithms you'll use most often as a programmer have already been discovered, tested, and proven。 If you want to take a hard pass on Knuth's brilliant but impenetrable theories and the dense multi-page proofs you'll find in most textbooks, this is the book for you。 This fully-illustrated and engaging guide makes it easy for you to learn how to use algorithms effectively in your own programs。

Grokking Algorithms is a disarming take on a core computer science topic。 In it, you'll learn how to apply common algorithms to the practical problems you face in day-to-day life as a programmer。 You'll start with problems like sorting and searching。 As you build up your skills in thinking algorithmically, you'll tackle more complex concerns such as data compression or artificial intelligence。 Whether you're writing business software, video games, mobile apps, or system utilities, you'll learn algorithmic techniques for solving problems that you thought were out of your grasp。 For example, you'll be able to:
Write a spell checker using graph algorithms
Understand how data compression works using Huffman coding
Identify problems that take too long to solve with naive algorithms, and attack them with algorithms that give you an approximate answer instead
Each carefully-presented example includes helpful diagrams and fully-annotated code samples in Python。 By the end of this book, you will know some of the most widely applicable algorithms as well as how and when to use them。

Download

Reviews

Duong Nguyen

all algorithms arranged by stories, make me feel interested and reading this like a journey

Zhorzh Zakaryan

Nice book with good visualizations。 Half of the book is pictures which helps you to understand how some algorithms work。 Very good for very beginners, however nearly useless for someone who is looking to deepen his/her knowledge in data structures and algorithms。 It touches only one or two sorting algorithms and the very basic ones。 There is a section about BFS, however no real explanation about DFS。 I think it's perfect if you have no idea about algorithms at all and you are interested in under Nice book with good visualizations。 Half of the book is pictures which helps you to understand how some algorithms work。 Very good for very beginners, however nearly useless for someone who is looking to deepen his/her knowledge in data structures and algorithms。 It touches only one or two sorting algorithms and the very basic ones。 There is a section about BFS, however no real explanation about DFS。 I think it's perfect if you have no idea about algorithms at all and you are interested in understanding some very basic ones for the first time, however, if you are looking for really learning algorithms(not only 2-3 of them), then you will need another source。 Overall I would say a better title for this book would have been "Grokking Algorithms An Illustrated Guide for Curious People"。 。。。more

Nguyễn Khánk

I love this book。 It's help me understand some complicated problems。 I love this book。 It's help me understand some complicated problems。 。。。more

Allarm

Это вредная книга。 Во-первых она очень поверхностна。 Более-менее подробно разобрано пять-шесть алгоритмов, остальные упоминаются совершенно вскользь с ремаркой «это слишком сложно для этой книги»。 Как пример - изящный алгоритм Диффи-Хеллмана описывается исключительно в контексте его функционала и автор даже поленился привести аналогию с цветами из википедии, которая отлично иллюстрирует саму суть алгоритма。 Книга очень короткая, набранная огромным шрифтом с кучей иллюстраций, которые не везде к Это вредная книга。 Во-первых она очень поверхностна。 Более-менее подробно разобрано пять-шесть алгоритмов, остальные упоминаются совершенно вскользь с ремаркой «это слишком сложно для этой книги»。 Как пример - изящный алгоритм Диффи-Хеллмана описывается исключительно в контексте его функционала и автор даже поленился привести аналогию с цветами из википедии, которая отлично иллюстрирует саму суть алгоритма。 Книга очень короткая, набранная огромным шрифтом с кучей иллюстраций, которые не везде к месту。 Плюс постоянно видно что автор пытается добавить ещё страницу другую, просто повторяя что уже было изложено в предыдущих главах, на всякий случай, если вы вдруг забыли, а перелистать обратно на две страницы назад ленитесь。 Примеры кода выполнены в Python, но совершено не в python-way。 Кмк лучше бы использовался алгоритмический псевдоязык в таком случае。 Русское издание - как обычно, как всегда。 Огромное количество опечаток, стрелки не туда, табуляция кода косячная местами。 Итог - книгу можно читать в качестве развлекательной мурзилки людям почти без опыта программирования, которые ни разу не слышали про хеш-таблицы и bfs/dfs, например。 Да и то, сразу по прочтению стоит навернуть что-то более академическое, чтобы все же разобраться с предметом, а не просто создать представление。 Эта книга не более чем любительский реферат на тему «что я узнал об алгоритмах за последний семестр»。 。。。more

Adam Jardali

Nice book, especially for beginners interested more in learning algorithms。

Diego Petrucci

So far I’ve read exactly one algorithms book。 This one was great。 The way the author manages to explain everything in such an intuitive way is great, and it feels natural。 However, you only really appreciate it when you try to look up the same topics on YouTube or some other resources — everything else seems needlessly complicated and confusing。My only grip with the book was that it did not explain *every* algorithm, so that I wouldn’t need any other teacher to learn。 It’s just so great。

Srinivasan Nanduri

Covers the breadth needed in getting your head around algorithms

esplovago

Good and fun introduction to data structures and algorithms。

Vlad Burlutsky

Must read for beginners

Mohammed Hemed

If you want read algorithm like a novel read this amazing tiny algorithms reference。

Zachary Shifrel

A really nice companion to more rigorous algorithms texts, also the author’s prose is far better and far less painful than most CS authors’。

Chris Sanchez

I really enjoyed this book and found it truly helpful。

Lev Konstantinovich

Очень интересная и полезная книга。 Которая знакомит тебя с базовыми алгоритмами и максимально просто и разнообразно показывает,как он работает。 Рекомендую всем кому интересно программирование , ну или людям ,которым просто интересно узнать, как устроено IT

Augusto Tijerina

Great book, very informative。

Brendan

My second “Grokking” book and easily the better of the two。 Aditya is able to communicate algorithms that otherwise feel abstruse into simple language and metaphor in a way that makes me want to wax poetic。Chapter 1) Not much to say about this one。 A pretty basic introduction to Big O and binary search using traditional examples (i。e。 searching for a name in a phone book and the paper folding exercise)。 The key here was introducing traveling salesman。 A sneaky way to introduce NP-complete proble My second “Grokking” book and easily the better of the two。 Aditya is able to communicate algorithms that otherwise feel abstruse into simple language and metaphor in a way that makes me want to wax poetic。Chapter 1) Not much to say about this one。 A pretty basic introduction to Big O and binary search using traditional examples (i。e。 searching for a name in a phone book and the paper folding exercise)。 The key here was introducing traveling salesman。 A sneaky way to introduce NP-complete problems without freaking out the reader with terms。Chapter 2)If you’re reading this book, chances are you already have, at the very least, some vague understanding of arrays and linked lists。 However, I’ve yet to see a better intuitive model for explaining to a beginner why linked lists are easier to insert into vs。 arrays and vice versa for reading。 The sorting of music by play count for the selection sort illustration is definitely the weaker image。 Personally, the more physical my illustrations the better。 The information itself is solid, if a bit clumsy in its switch to an actual code example。 If there is one thing I wish this book did better, it is transitioning into the code examples。 It is all well and fine if you understand the concept of picking the largest number in a list recursing through that list until you have finished, but a much different thing to translate your knowledge into code。Chapter 3)I have no critique。 A near perfect chapter。 All of the mental models are physical, intuitive, and easy to remember and the code is embedded in the text。Chapter 4)This chapter introduced me to the word ‘algorithmist’, which I’m not convinced is a word, but is quite fun to write。Essentially separated into two sections—which matches with the divide and conquer methodology。 Highly recommend reading this pretty soon after you read the recursion chapter。 The build from Chapter 3 is pretty natural and cements the knowledge in a little bit more and gives a nice concrete example in the sum function。Lots of stuff in the second half: quicksort, a small introduction to inductive proofs, and then touching on Big O notation again。 My big complaint here is that he doesn’t talk at all about how to effectively choose a pivot for quicksort even while writing for a bit too long on the difference between worst case and average case。 While worst vs。 average is an important topic, it is pretty simple to understand。Chapter 5)The beginning portion is about as clear as you can possibly be on hash functions without diving into the weeds of how the actual hashing functions work。 The caching portion however。。。was lackluster。 I’m not sure it was relevant enough to include, and since the caching portion is lacking in details about what exactly is mapping to what when you cache a web page, I think it just leaves readers feeling like they missed something: they did miss something, but so did the author, as the information isn’t in the book。 The rest is fine, but does the lazy thing of defaulting to “not needing to know” on things like SHA functions。 I mean, I get it, we probably don’t, but in a book about grokking, it seems like you would want to include it。 A bit of a letdown through that section。Chapter 6)Oh boy, graphs are so much fun。 Examples were clear and informative。 My only qualm is the lack of communication about cyclic and acyclic graphs。 I think they deserve at least a shout in a format like this。 If you can talk about load factor in the previous chapter, you can talk about cycles in this one!Chapter 7)He mentioned cycles! Although, I still think it is a bit late。 Overall, the treatment of Dijkstra was。。。fine。 The treatment of negative weights was something I wish the author would examine at a deeper level。 Probably should include some information about Bellman-Ford。 It was rather unsatisfying to see the example left unfinished when a solution does exist。Chapter 8)A too short introduction to NP-completeness。 To be fair, whole books on NP-complete & incompleteness are too short。 Greedy algorithms probably needed a little less ink, and I’m not sure that the example was the best possible one to use。Chapter 9)A very good introduction to dynamic programming。 One of the better ones I’ve seen。 My only problem is that he tried to extend out the chapter maybe a little bit too long。 He could’ve filled that space by comparing it to Divide & Conquer in order to illustrate the difference。Chapter 10)Fun, KNN is great, but almost seemed out of scope。 The lack of coding examples doesn’t help。 Just theoretical, which is fine, but KNN is not a hard concept to grasp。Really a wonderful book。 。。。more

Alessandro

The book is so simple and that is both its aim and its strength。 Super recommended for junior developers, but also to senior ones that want to refresh their knowledge about the most common algorithms and concepts about how to approach problems。 In my opinion also a good book to keep in the shelf for tech persons that want to quickly check what might be the best approach to a given problem。

Zichang

pros: The content is helpful and friendly to beginner and really easy to be understood。Every chapter has associated code in serval languages(e。g。 c++, python), which reader can get in github。cons:The book is too basic to delve into。A few of typo in the book, esp in the coding part。

LL

Было правда очень круто! Познавательно, развлекательно и очень все понятно。 Все так в кайф, задачи интересные, кода достаточно。 Не знаю, можно ли написать что-то лучшее для новичков

Alb85

Il libro offre una panoramica sul mondo degli algoritmi e delle strutture dati。 Mi ha piacevolmente colpito la formula usata nel libro。 L’autore infatti ha riempito le pagine di schizzi ben curati che facilitano notevolmente la lettura。Non aspettatevi però di diventare esperti di algoritmi。 Il libro tratta solo pochi concetti nel dettaglio e nell’ultimo capitolo ne descrive brevemente altri dieci che ritiene importanti nel campo del Machine Learning。Appunti:1。 La notazione O grande misura il num Il libro offre una panoramica sul mondo degli algoritmi e delle strutture dati。 Mi ha piacevolmente colpito la formula usata nel libro。 L’autore infatti ha riempito le pagine di schizzi ben curati che facilitano notevolmente la lettura。Non aspettatevi però di diventare esperti di algoritmi。 Il libro tratta solo pochi concetti nel dettaglio e nell’ultimo capitolo ne descrive brevemente altri dieci che ritiene importanti nel campo del Machine Learning。Appunti:1。 La notazione O grande misura il numero dei passi di un algoritmo。2。 ricerca binaria (divide and conquer): ad ogni passo di fa una domanda (binaria) si/no。t- struttura dati necessaria: array ordinato3。 Strutture dati base:t- array permettono accesso randomt- linked list sono veloci a inserire e cancellaret- Hash map (o dizionario) è un funzione hash piu un array。 La funzione hah deve essere consistente (dato un input deve dare sempre lo stesso output)tt- load factor: numero item / slot totali。 Se è >0,7 è raccomandato aumentare la dimensione della hash map。t- coda: struttura dati FIFOt- stack: struttura dati LIFO4。 Algoritmi di ordinamento:t- selection sort O(n^2)t- quick sort ((divide and conquer)): tempo medio O(nlog(n))5。 per rappresentare un grafo si usa una hash table。 t- Per trovare un percorso con meno segmenti attraversati da A a B (ricerca in ampiezza o anche detta Breadth-first search) si usa la coda come struttura dati di appoggio。t- Dijkstra’s algorithm, solo per grafi con pesi > 0 diretti。6。 algoritmo greedy: ad ogni passo prendi la soluzione localmente ottimale。t- utili se volgliamo risolvere problemi NP-completi。t7。 programmazione dinamica: si basa sulla divisione del problema in sottoproblemi e sull'utilizzo di sottostrutture ottimali。t- Biologi utilizzano la piu lunga sottosequenza in comune per trovare le similitudini da sequenze di DNA。8。 KNN usato per classificare (fare categorie) o per predire risposta (regressione)。t- formula della distanza euclideat- similarità del coseno (cosine similarity)tAltri argoritmi accennati ma non disussi:t- alberi: B-trees, Red-black trees, Heaps, Splay treest- inverted indext- trasformata di Fouriert- parallel algorithmt- Distributed algorithms, in particolare MapReduce (usa 2 fuzioni: map e reduce)t- bloom filters: tabelle hast danno risultato certo, blomm filters danno risultato probabilistico, solo falsi positivi ammessi。t- HyperLogLogt- SHA: La funzione hash per le tabelle hash prendono una stringa e restituiscono un indice dell'array, mentre SHA prende una stringa e restituisce una stringa。tt- Simhash: se si cambia di poco l'input anche l'output cambia di poco。t- algoritmi chiavi pubblica,privata: Diffie-Hellman seguito da RSA。t- programmazione lineare。 。。。more

Nick Schmitt

A very simple introduction to various important algorithms。 I recommend starting with this book before jumping deeper into algorithms。

Mahmoud Hamed

A great introduction to algorithms and data structures

Jack Vinson

What fun! I haven’t done serious programming in quite a while, and that isn’t my formal training。 But algorithms are important outside of coding, and it is nice to have these simple, practical explanations。 Good stuff about commonly jobs in software, and the ways to think about various algorithms to attack those jobs。 Discussion of the scaling behind different algorithms。 Discussion of various storage approaches - lists, arrays, sets, hash tables。。。 Even little dips into machine learning。A very What fun! I haven’t done serious programming in quite a while, and that isn’t my formal training。 But algorithms are important outside of coding, and it is nice to have these simple, practical explanations。 Good stuff about commonly jobs in software, and the ways to think about various algorithms to attack those jobs。 Discussion of the scaling behind different algorithms。 Discussion of various storage approaches - lists, arrays, sets, hash tables。。。 Even little dips into machine learning。A very fast read, even with pulling up Python to run through some of the examples。 。。。more

Adnane Kouna

It's a really great introduction to algorithms and data-structure and the illustrations are so helpful to better understand the concepts especially the later chapters (8th, 9th and 10th chapter)。 It's a really great introduction to algorithms and data-structure and the illustrations are so helpful to better understand the concepts especially the later chapters (8th, 9th and 10th chapter)。 。。。more

Vagif Aghayev

Overall, very recommend this book for an introduction to algorithms。 However, some parts could be explained better (for instance, Dijkstra's algorithm)。 Overall, very recommend this book for an introduction to algorithms。 However, some parts could be explained better (for instance, Dijkstra's algorithm)。 。。。more

Antares

Bardzo dobra zarówno dla początkujących, jak i dla kogoś, kto chce wrócić do tematu i uporządkować/odświeżyć sobie wiedzę。 Super wytłumaczone, rozrysowane, podane w lekkostrawnej pigułce。 Polecam!Ocena LC: 7/10

Luke

An excellent introductory book, you really don't need any prior knowledge, well you need to be able to read。 An excellent introductory book, you really don't need any prior knowledge, well you need to be able to read。 。。。more

Arman Ahmadi

This book is a gate to the world of Algorithms。 I highly recommend this book to everyone especially juniors, because it's easy to read and follow along。 This book is a gate to the world of Algorithms。 I highly recommend this book to everyone especially juniors, because it's easy to read and follow along。 。。。more

Kirill Gerke

A really simple and visual introduction to data structures and algorithms for anybody who wants to get an idea。 Read this one and then move to Cormen et al。 Algorithms for real depth。

Surya

Given my day job I should probably more books like these, but then there aren't many that has cool illustrations and cooler examples。 This book is one of a kind <3 Given my day job I should probably more books like these, but then there aren't many that has cool illustrations and cooler examples。 This book is one of a kind <3 。。。more

Roman Kukin

coders must read